Skip to content

fix: update demo apps for Expo 55 / RN 0.83 compatibility#1075

Open
msluszniak wants to merge 5 commits intomainfrom
chore/upgrade-expo55-rn083
Open

fix: update demo apps for Expo 55 / RN 0.83 compatibility#1075
msluszniak wants to merge 5 commits intomainfrom
chore/upgrade-expo55-rn083

Conversation

@msluszniak
Copy link
Copy Markdown
Member

@msluszniak msluszniak commented Apr 14, 2026

Summary

  • Bump @react-navigation/native to ^7.2.2 across CV, LLM, and text-embeddings apps to align @react-navigation/core versions (fixes "Element type is invalid" crash in Drawer/Stack navigators)
  • Replace DrawerToggleButton with custom SVG hamburger icon in all Drawer apps (broken PNG assets in @react-navigation/drawer 7.9.x)
  • Replace react-native-device-info with expo-constants in CV app (module-level NativeEventEmitter crash on RN 0.83 New Architecture)
  • Move createSynchronizable calls inside component in CV vision_camera screen (fails at module scope before worklets runtime is ready)
  • Remove react-native-audio-api/metro-config from speech and LLM metro configs (not published in 0.11.7)
  • Fix react-native-audio-api 0.11.7 API changes in LLM voice_chat screen (AudioRecorder constructor, onAudioReady signature, allowBluetoothHFP)
  • Upgrade @shopify/react-native-skia to 2.6.2 in CV app
  • Add POST-PREBUILD.md documenting required native patches after expo prebuild (Buildship stub cleanup in settings.gradle, stale pods)

Test plan

  • CV app builds and runs on Android
  • CV app builds and runs on iOS
  • LLM app builds and runs on Android
  • LLM app builds and runs on iOS
  • Speech app builds and runs on Android
  • Speech app builds and runs on iOS
  • Text-embeddings app builds and runs on Android
  • Text-embeddings app builds and runs on iOS
  • Bare RN app builds and runs on Android
  • Bare RN app builds and runs on iOS

@msluszniak msluszniak self-assigned this Apr 14, 2026
@msluszniak msluszniak added blocked Issue blocked by some problems (but not other issue, use relationship -> blocker instead) 3rd party package Issue related to 3rd party packages, but not ExecuTorch, e.g. Expo labels Apr 14, 2026
@msluszniak msluszniak linked an issue Apr 14, 2026 that may be closed by this pull request
@msluszniak
Copy link
Copy Markdown
Member Author

This is not ready to merge as this needs manual patching described in POST-PREBUILD.md file.

- Bump computer-vision, llm, speech, and text-embeddings to expo ^55.0.13
  / react-native 0.83.4 / react 19.2.5
- Bump @react-navigation/native to ^7.2.2 to align @react-navigation/core
  versions and fix "Element type is invalid" crash in Drawer/Stack navigators
- Replace DrawerToggleButton with a custom SVG hamburger icon in the apps
  that use Drawer (broken PNG assets in @react-navigation/drawer 7.9.x)
- Replace react-native-device-info with expo-constants in computer-vision
  BottomBar (module-level NativeEventEmitter crashes on the new architecture
  in RN 0.83)
- Move createSynchronizable calls inside the component in vision_camera
  screen (fails at module scope before the worklets runtime is ready)
- Drop react-native-audio-api/metro-config from speech metro config (not
  published in the audio-api versions used here)
@msluszniak msluszniak force-pushed the chore/upgrade-expo55-rn083 branch from 60c0e50 to dc31fec Compare April 28, 2026 13:09
The cache `restore-keys` fallback (`${{ runner.os }}-expo-android-`)
matches any prior cache, so a pre-Expo-55 android/ folder was being
restored on top of Expo 55 / RN 0.83 node_modules — leaving
`MainApplication.kt` referencing the now-removed `ReactNativeHostWrapper`
and breaking `:app:compileDebugKotlin`.

Drop the prebuild cache and always re-run `expo prebuild`, mirroring
the iOS workflow. Prebuild itself is fast; Gradle deps remain cached
by the next step.
@msluszniak msluszniak marked this pull request as ready for review April 28, 2026 13:52
@msluszniak msluszniak removed the blocked Issue blocked by some problems (but not other issue, use relationship -> blocker instead) label Apr 28, 2026
… in Metro

Bumping the four Expo apps to RN 0.83.4 leaves bare-rn alone on RN 0.81.5,
so yarn can no longer hoist a single react-native to the workspace root.
With mixed versions in the tree, yarn picks 0.83.4 for the root and bare-rn
ends up with its own per-app node_modules/react-native@0.81.5, while the
companion @react-native/gradle-plugin is only present at the root in the
0.83-aligned shape — Gradle then can't resolve hermes-android:0.83.4 for
bare-rn.

- installConfig.hoistingLimits=workspaces in apps/bare-rn/package.json so
  bare-rn's full RN tree (including @react-native/gradle-plugin) lands in
  apps/bare-rn/node_modules/ and stays internally consistent.
- Repoint settings.gradle and app/build.gradle from ../../../node_modules/
  / ../../../../node_modules/ (workspace root) to ../node_modules/ /
  ../../node_modules/ (bare-rn local). The iOS Podfile already resolves
  via node -p require.resolve, so no Podfile change is needed.
- Set resolver.disableHierarchicalLookup in metro.config.js. The workspace
  packages (react-native-executorch, bare-resource-fetcher) declare their
  own react devDependency and end up with their own node_modules/react,
  so without disabling Metro's per-file lookup the bundle ships two React
  copies and useState's dispatcher comes back null.
…l error

Xcode 26.4 / Apple clang 21 tightened consteval enforcement. fmt 9.x
(vendored by RCT-Folly in RN 0.81.x) annotates its basic_format_string
constructor with FMT_CONSTEVAL, which the new clang rejects at the call
site (Yoga, React-performancetimeline, etc.) compiling against fmt's
cached clang module.

Setting CLANG_CXX_LANGUAGE_STANDARD=c++17 on the fmt and RCT-Folly pod
targets makes fmt's `__cplusplus >= 202002L` gate fall through and
FMT_CONSTEVAL resolve to empty in the cached module — so consumers
import a non-consteval module and the call site compiles. Also append
FMT_USE_CONSTEVAL=0 for belt-and-suspenders coverage.

Setting the standard only on the fmt/RCT-Folly targets rather than the
consumers works because clang caches a per-target compiled module: when
fmt is built in C++17, that artifact is what other targets pick up,
regardless of their own -std.

Refs facebook/react-native#55601, fmtlib/fmt#4740.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3rd party package Issue related to 3rd party packages, but not ExecuTorch, e.g. Expo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bump expo to version 55 in demo apps

1 participant